package filters;

import javax.servlet.*;
import coreservlets.filters.*;

public class ReplaceCEOFilter extends ReplaceFilter {
  private String oldCEO = "None specified";
  private String newCEO = "None specified";

  @Override
  public void init(FilterConfig config)
      throws ServletException {
    String oldCEO = config.getInitParameter("oldCEO");
    if (oldCEO != null) {
      this.oldCEO = oldCEO;
    }
    String newCEO = config.getInitParameter("newCEO");
    if (newCEO != null) {
      this.newCEO = newCEO;
    }
  }

  @Override
  public String getTarget() {
    return(oldCEO);
  }

  @Override
  public String getReplacement() {
    return(newCEO);
  }
}
